﻿ 

// #region  枚举格式化
function formatEnum(val:number, row:number=null) {
    var result = "";
    switch (val) {
        case DirectionEnum.Up11:
            result = "上行";
            break;
        case DirectionEnum.Down12:
            result = "下行";
            break;
        case DirectionEnum.All13:
            result = "全幅";
            break;
        case AdminLevelEnum.G15:
            result = "国道";
            break;
        case AdminLevelEnum.S16:
            result = "省道";
            break;
        case AdminLevelEnum.X17:
            result = "县道";
            break;
        case AdminLevelEnum.Y18:
            result = "乡道";
            break;
        case AdminLevelEnum.C19:
            result = "村道";
            break;
        case AdminLevelEnum.Z20:
            result = "专用道路";
            break;
        case PavementTypeEnum.P21:
            result = "沥青路面";
            break;
        case PavementTypeEnum.P22:
            result = "水泥路面";
            break;
        case PavementTypeEnum.P23:
            result = "砂石路面";
            break;
        case SturctureEnum.B111:
            result = "桥梁";
            break;
        case SturctureEnum.T120:
            result = "隧道";
            break;
        case SturctureEnum.C125:
            result = "涵洞";
            break;
        case BridgeEnum.B112:
            result = "公路桥";
            break;
        case BridgeEnum.B113:
            result = "铁路桥";
            break;
        case BridgeEnum.B114:
            result = "公铁两用桥";
            break;
        case BridgeEnum.B115:
            result = "闸坝桥";
            break;
        case BridgeEnum.B116:
            result = "人行桥";
            break;
        case BridgeEnum.B117:
            result = "通道桥";
            break;
        case BridgeEnum.B118:
            result = "其他";
            break;
        case TunnelEnum.T121:
            result = "公路隧道";
            break;
        case TunnelEnum.T122:
            result = "山岭隧道";
            break;
        case TunnelEnum.T123:
            result = "水下隧道";
            break;
        case CulvertEnum.C126:
            result = "圆管涵";
            break;
        case CulvertEnum.C127:
            result = "箱涵";
            break;
        case CulvertEnum.C128:
            result = "拱涵";
            break;
        case BridgeTechnicalEnum.B141:
            result = "特大桥";
            break;
        case BridgeTechnicalEnum.B142:
            result = "大桥";
            break;
        case BridgeTechnicalEnum.B143:
            result = "中桥";
            break;
        case BridgeTechnicalEnum.B144:
            result = "小桥";
            break;
        case TunnelTechnicalEnum.T146:
            result = "特长隧道";
            break;
        case TunnelTechnicalEnum.T147:
            result = "长隧道";
            break;
        case TunnelTechnicalEnum.T148:
            result = "中隧道";
            break;
        case TunnelTechnicalEnum.T149:
            result = "短隧道";
            break;
        case RoadClassEnum.R160:
            result = "高速公路";
            break;
        case RoadClassEnum.R161:
            result = "一级公路";
            break;
        case RoadClassEnum.R162:
            result = "二级公路";
            break;
        case RoadClassEnum.R163:
            result = "三级公路";
            break;
        case RoadClassEnum.R164:
            result = "四级公路";
            break;
        case RoadBasicTypeEnum.B165:
            result = "半刚性基层";
            break;
        case RoadBasicTypeEnum.B166:
            result = "刚性基层";
            break;
        case RoadBasicTypeEnum.B167:
            result = "柔性基层";
            break;
        case RoadBasicTypeEnum.B171:
            result = "钢筋混凝土";
            break;
        case RoadBasicTypeEnum.B172:
            result = "普通水泥混凝土";
            break;
        case RoadBasicTypeEnum.B173:
            result = "连续配筋混凝土";
            break;
        case RoadBasicTypeEnum.B174:
            result = "钢纤维混凝土";
            break;
        case SubgradeEnum.S180:
            result = "岩溶地区路基";
            break;
        case SubgradeEnum.S181:
            result = "红粘土地区路基";
            break;
        case SubgradeEnum.S182:
            result = "高液限土地区路基";
            break;
        case SubgradeEnum.S183:
            result = "膨胀土地区路基";
            break;
        case SubgradeEnum.S184:
            result = "黄土地区路基";
            break;
        case SubgradeEnum.S185:
            result = "盐泽土路基";
            break;
        case SubgradeEnum.S186:
            result = "冻土地区路基";
            break;
        case SubgradeEnum.S187:
            result = "风沙地区路基";
            break;
        case SubgradeEnum.S188:
            result = "软基";
            break;
        case SubgradeEnum.S189:
            result = "常规土";
            break
        case ShoulderEnum.S191:
            result = "土路肩";
            break;
        case ShoulderEnum.S192:
            result = "硬路肩";
            break;
        case RdStandardTypeEnum.R200:
            result = "路面结构";
            break;
        case RdStandardTypeEnum.R201:
            result = "构造物";
            break;
        case RdStandardTypeEnum.R202:
            result = "行政区域";
            break;
        case RdStandardTypeEnum.R203:
            result = "管养单位";
            break;
        case RdStandardTypeEnum.R204:
            result = "车道数";
            break;
        case RdStandardTypeEnum.R205:
            result = "路面宽度";
            break;
        case RdStandardTypeEnum.R206:
            result = "土基类型";
            break;
        case RdStandardTypeEnum.R207:
            result = "交通量";
            break;
        case RdStandardTypeEnum.R208:
            result = "有无路肩";
            break;
        case RdStandardTypeEnum.R209:
            result = "通车时间";
            break;
        case RdStandardTypeEnum.R210:
            result = "技术等级";
            break;
        case RdStandardTypeEnum.R211:
            result = "是否全幅";
            break;
        case RegressionIndicatorsEnum.PQI801:
            result = "PQI";
            break;
        case RegressionIndicatorsEnum.PCI802:
            result = "PCI";
            break;
        case RegressionIndicatorsEnum.PSSI803:
            result = "PSSI";
            break;
        case RegressionIndicatorsEnum.RQI804:
            result = "RQI";
            break;
        case RegressionIndicatorsEnum.RDI805:
            result = "RDI";
            break;
        case RegressionIndicatorsEnum.PQI801:
            result = "RDI";
            break;
        case RegressionIndicatorsEnum.SRI806:
            result = "SRI";
            break;
        case ModelFormEnum.M821:
            result = "直线型";
            break;
        case ModelFormEnum.M822:
            result = "指数型";
            break;
        case ModelFormEnum.M823:
            result = "多项式型";
            break;
        case ModelFormEnum.M824:
            result = "S型";
            break
        case CarEnum.C1000:
            result = "载重汽车-小型";
            break;
        case CarEnum.C1001:
            result = "载重汽车-中型";
            break;
        case CarEnum.C1002:
            result = "载重汽车-大型";
            break;
        case CarEnum.C1003:
            result = "载重汽车-特大型";
            break;
        case CarEnum.C1004:
            result = "客车-小型";
            break;
        case CarEnum.C1005:
            result = "客车-大型";
            break;
        case CarEnum.C1006:
            result = "拖挂车";
            break;
        case CarEnum.C1007:
            result = "集装箱车";
            break;
        case CarEnum.C1008:
            result = "拖拉机";
            break;
        case MainTypeEnum.M12000:
            result = "日常养护";
            break;
        case MainTypeEnum.M12001:
            result = "预防性养护";
            break;
        case MainTypeEnum.M12002:
            result = "中修";
            break;
        case MainTypeEnum.M12003:
            result = "大修";
            break;
    }
    return result;
}
//#endregion

/**行车方向**/
enum DirectionEnum {
    /**上行*/
    Up11= 11,
    /**下行*/
    Down12= 12,
    /**全幅*/
    All13 = 13,
}
/**行政等级*/
enum AdminLevelEnum
{   
    /**国道*/
    G15 = 15,
    /**省道*/    
    S16 = 16,
    /**县道*/   
    X17 = 17,
    /**乡道*/
    Y18 = 18,
    /**村道*/
    C19 = 19,
    /**专用道路*/   
    Z20 = 20
}


/**路面类型**/
enum PavementTypeEnum {
    /**沥青路面**/
    P21 = 21,
    /**水泥路面**/
    P22 = 22,
    /**砂石路面**/
    P23 = 23
}

/**结构类型*/
enum SturctureEnum {
    /**桥梁*/
    B111 = 111,        
    /**隧道*/
    T120 = 120,        
    /**涵洞*/
    C125 = 125
}

/**桥梁类型**/
enum BridgeEnum {
    /**公路桥*/
    B112 = 112,
    /**铁路桥*/
    B113  = 113, 
    /**公铁两用桥*/
    B114 = 114,
    /**闸坝桥*/
    B115 = 115,
    /**人行桥*/
    B116 = 116,
    /**通道桥*/
    B117 = 117,        
    /**其他*/
    B118 = 118
}

/**隧道类型*/
enum TunnelEnum {
    /**公路隧道*/
    T121 = 121,
    /**山岭隧道*/
    T122 = 122,
    /**水下隧道*/
    T123  = 123
}


/**涵洞类型*/
enum CulvertEnum {    
    /**圆管涵*/
     C126 = 126,
    /**箱涵*/
    C127 = 127,        
    /**盖板涵*/
    C128 = 128,
    /**拱涵*/
    C129 = 129
}

/**桥梁技术等级**/
enum BridgeTechnicalEnum {
    /**特大桥**/
    B141 = 141,
    /**大桥**/
    B142 = 142,
    /**中桥**/
    B143 = 143,
    /**小桥**/
    B144 = 144
}

/**隧道技术等级**/
enum TunnelTechnicalEnum {
    /**特长隧道**/
    T146 = 146,
    /**长隧道**/
    T147 = 147,
    /**中隧道**/
    T148 = 148,
    /**短隧道**/
    T149 = 149
}

/**公路技术等级**/
enum RoadClassEnum {
    /**高速公路**/
        R160 = 160,
    /**一级公路**/
        R161 = 161,
    /**二级公路**/
        R162 = 162,
    /**三级公路**/
        R163 = 163,
    /**四级公路**/
        R164 = 164
}
/**路面基层类型**/
enum RoadBasicTypeEnum {
    /**半刚性基层**/
    B165 = 165,
    /**刚性基层**/
    B166 = 166,
    /**柔性基层**/
    B167 = 167,
    /**钢筋混凝土**/
    B171 = 171,
    /**普通水泥混凝土**/
    B172 = 172,
    /**连续配筋混凝土**/
    B173 = 173,
    /**钢纤维混凝土**/
    B174 = 174,
}

/**土基类型**/
enum SubgradeEnum {
     /**岩溶地区路基**/
        S180 = 180,
     /**红粘土地区路基**/
        S181 = 181,
     /**高液限土地区路基**/
        S182 = 182,
     /**膨胀土地区路基**/
        S183 = 183,        
     /**黄土地区路基**/
        S184 = 184,
     /**盐泽土路基**/
        S185 = 185,
     /**冻土地区路基**/
        S186 = 186,
     /**风沙地区路基**/
        S187 = 187,        
     /**软基**/
        S188 = 188,
     /**常规土**/
        S189 = 189
}

/**路肩类型**/
enum ShoulderEnum {
     /**土路肩**/
        S191 = 191,
     /**硬路肩**/
        S192 = 192
}

/*路段划分标准类型*/
enum RdStandardTypeEnum {
     /**路面结构**/
        R200 = 200,
     /**构造物**/
        R201 = 201,
     /**行政区域**/
        R202 = 202,
     /**管养单位**/
        R203 = 203,
     /**车道数**/
        R204 = 204,
     /**路面宽度**/
        R205 = 205,
     /**土基类型**/
        R206 = 206,
     /**交通量**/
        R207 = 207,
     /**有无路肩**/
        R208 = 208,
     /**通车时间**/
        R209 = 209,
     /**技术等级**/
        R210 = 210,
     /**是否全幅**/
        R211 = 211
}

/*模型类型*/
enum RegressionIndicatorsEnum {
     /**PQI**/
        PQI801 = 801,
     /**PCI**/
        PCI802 = 802,
     /**PSSI**/
        PSSI803 = 803,
     /**RQI**/
        RQI804 = 804,
     /**RDI**/
        RDI805 = 805,
     /**SRI**/
        SRI806 = 806
}

/*模型形式*/
enum ModelFormEnum {
     /**直线型**/
        M821 = 821,
     /**指数型**/
        M822 = 822,
     /**多项式型**/
        M823 = 823,
     /**S型**/
        M824 = 824
}

/**车型**/
enum CarEnum {
    /**载重汽车-小型**/
        C1000 = 1000,
    /**载重汽车-中型**/
        C1001 = 1001,
    /**载重汽车-大型**/
        C1002 = 1002,
    /**载重汽车-特大型**/
        C1003= 1003,
    /**客车-小型**/
        C1004 = 1004,
    /**客车-大型**/
        C1005 = 1005,
    /**拖挂车**/
        C1006 = 1006,
    /**集装箱车**/
        C1007 = 1007,
    /**拖拉机**/
        C1008 = 1008
}


/**养护类型**/
enum MainTypeEnum {
    /**日常养护**/
        M12000 = 12000,    
    /**预防性养护**/
        M12001 = 12001,
    /**中修**/
        M12002 = 12002,
    /**大修**/
        M12003 = 12003
}